From: Carlos Garnacho Date: Fri, 29 Oct 2021 14:46:18 +0000 (+0200) Subject: inputMethod: Do not reset invisible preedit on focus_out X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~536^2^2~100 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=01775609525b12de752a2f7ebac88baee9b041d3;p=gnome-shell.git inputMethod: Do not reset invisible preedit on focus_out If the preedit is in invisible state, the last preedit string that was sent around is already null, so there is no need to clear the preedit in that case. Part-of: --- diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js index 71dff84f5..8c3cd61ae 100644 --- a/js/misc/inputMethod.js +++ b/js/misc/inputMethod.js @@ -167,7 +167,7 @@ class InputMethod extends Clutter.InputMethod { if (this._context) this._context.focus_out(); - if (this._preeditStr) { + if (this._preeditStr && this._preeditVisible) { // Unset any preedit text this.set_preedit_text(null, 0, this._preeditCommitMode); this._preeditStr = null;